package org.wordpress.android.listeners;


import android.app.Activity;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;

public class GoBackTouchListener implements OnTouchListener {

    private GestureDetector gestureDetector;

    public GoBackTouchListener(Activity activity) {
        super();
        this.gestureDetector = new GestureDetector(new GoBackGestureListener(activity));
    }

    @Override
    public boolean onTouch(View v, MotionEvent event) {
        this.gestureDetector.onTouchEvent(event);
        return true;
    }
}